#include <bits/stdc++.h>
using namespace std;
int n;
const int N=2050;
int a[N];
struct Ope{
    int a,b,c;
};
vector<Ope> res;
int main(void){
    scanf("%d",&n);
    bool flag=true;
    for(int i=1;i<=n;i++){
        scanf("%d",&a[i]);
        if(a[i]<=a[i-1]){
            flag=false;
        }
    }
    if(flag){
        printf("0\n");
        return 0;
    }
    for(int i=n;i>0;i--){
        int t=(i-1-a[i]%n+n)%n;
        //printf("%d\n",t);
        res.push_back(Ope{1,i,t});
        for(int j=0;j<i;j++){
            a[j]+=t;
        }
    }
    res.push_back(Ope{2,n,n});
    int l=res.size();
    printf("%d\n",l);
    for(int i=0;i<l;i++){
        printf("%d %d %d\n",res[i].a,res[i].b,res[i].c);
    }
    return 0;
}